package com.isoft.hospital.controller;

import com.isoft.hospital.common.ResponseData;
import com.isoft.hospital.entity.Login;
import com.isoft.hospital.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {
    @Autowired
    private LoginService service;
    @RequestMapping(value = "/login",method = RequestMethod.POST)

    public ResponseData login(Login login){

        return  service.login(login);
    }
}
